﻿<!DOCTYPE html>
<html lang="ru"><object type="{0C55C096-0F1D-4F28-AAA2-85EF591126E7}" cotype="cs" id="cosymantecbfw" style="width: 0px; height: 0px; display: block;"></object><head>
        <meta charset="utf-8">
        <title>Remont Admin</title>
		<link rel="stylesheet" href="/css/bootstrap.min.css">
        <link rel="stylesheet" href="/css/blue.css">
        <link rel="stylesheet" href="/css/style.css">
		<link type="text/css" rel="stylesheet" href="chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/style.css"><script type="text/javascript" charset="utf-8" src="chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/page_context.js"></script><script type="text/javascript" id="waxCS">var WAX = function () { var _arrInputs; window.addEventListener('waxSetArr', function(evt) {_arrInputs=evt.detail;}); return { getElement: function (i) { return _arrInputs[i]; } } }(); function waxGetElement(i) { return WAX.getElement(i); }</script></head>
    <body class="login_page" screen_capture_injected="true">
<?php
	$host = 'localhost';
	$user = 'kuzenkon_demo';
	$pwd  = 'demo';
	$dbname = 'kuzenkon_demo2';
	$db = mysql_connect($host, $user, $pwd);
	mysql_select_db($dbname, $db);
	
	@error_reporting ( E_ALL ^ E_WARNING ^ E_NOTICE ^ E_DEPRECATED);
	@ini_set ( 'display_errors', true );
	@ini_set ( 'html_errors', false );
	@ini_set ( 'error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE ^ E_DEPRECATED);
	
	$imei = (int)$_REQUEST["imei"];
	
	
	if ($imei != NULL) {
	
		$zk = mysql_query("SELECT * FROM orders WHERE imei=$imei LIMIT 1");
		
		if (mysql_num_rows($zk) != 0) {
			
			$zk=mysql_fetch_array($zk);	
			
			$fio = $zk['client_name'];
			$model = $zk['model'];
			$date_end_remont = $zk['date_end_remont'];
			
			$info = '<b style="display: inline-block; width: 70px;">ФИО:&nbsp;</b>'.$zk['client_name'].'<br/>'.'<b style="display: inline-block; width: 70px;">Модель:&nbsp;</b>'.$zk['model'].'<br/>'.'<b style="display: inline-block; width: 70px;">IMEI:&nbsp;</b>'.$zk['imei'].'<br/>';
			
			
			
			
			$status = '';
			$status2 = '';
			$status3 = '';
			$status4 = '';
			
			if($zk['bool_ready'] == 1){$status = '<span><b style="display: inline-block; width: 70px;">Статус:&nbsp;</b>Сделан</span>';}
			elseif($zk['bool_ready'] == 2){$status = '<span><b style="display: inline-block; width: 70px;">Статус:&nbsp;</b>Не&nbsp;сделан</span><br/><span><b>Окончание&nbsp;ремонта:&nbsp;</b>'.date('Y.m.d', $zk['date_end_remont']).'</span>';}
			elseif($zk['bool_ready'] == 0 && $zk['id_master'] != 0){$status2 = '<span><b style="display: inline-block; width: 70px;">Статус:&nbsp;</b>Ждет&nbsp;запчасть&nbsp;</span>';}
			elseif($zk['bool_work'] != 0 && $zk['id_master'] == 0){$status2 = '<span style="font-size:80%;"><b style="display: inline-block; width: 70px;">Статус:&nbsp;</b>Ждет&nbsp;запчасть&nbsp;</span>';}
			elseif($zk['refusal'] != ''){$status3 = '<span><b style="display: inline-block; width: 70px;">Статус:&nbsp;</b>Отказ</span>';}
			elseif($zk['date_admision'] != 0 && $zk['bool_diagnosis'] == 0){$status3 = '<span><b style="display: inline-block; width: 70px;">Статус:&nbsp;</b>На&nbsp;диагностике</span>';}
			
			/*
			if($zk['bool_ready'] == 1){$status = '<span class="alert alert-success stt">Сделан</span>';}
			elseif($zk['bool_ready'] == 2){$status = '<span class="alert alert-error stt">Не&nbsp;сделан</span>';}
			elseif($zk['bool_ready'] == 0 && $zk['id_master'] != 0){$status = '<span class="alert alert-info stt">Ждет&nbsp;запчасть&nbsp;</span>';}
			elseif($zk['bool_work'] != 0 && $zk['id_master'] == 0){$status = '<span class="alert alert-info stt" style="font-size:80%;">Ждет&nbsp;запчасть&nbsp;</span>';}
			elseif($zk['refusal'] != ''){$status = '<span class="alert alert-error stt">Отказ</span>';}
			elseif($zk['date_admision'] != 0 && $zk['bool_diagnosis'] == 0){$status = '<span class="alert stt">На&nbsp;диагностике</span>';}
			elseif($zk['date_giving'] != 0){$status = '<span class="alert alert-success stt">Выдан</span>';}
			elseif($zk['bool_work'] == 0 && $zk['bool_ready'] == 0 && $zk['refusal']=='' && $zk['date_giving']==0 && $zk['bool_pozvon'] == 1){$status = '<span class="alert stt">Отправить&nbsp;в&nbsp;ремонт</span>';}
			elseif($zk['bool_diagnosis'] == 1){$status = '<span class="alert stt">Нужно&nbsp;позвонить</span>';}
			else{$status = '-';}
			
			if($zk['bool_diagnosis'] == 1) {$status2 = '<span class="alert stt">Диагностика&nbsp;сделана</span>';}
			elseif($zk['bool_diagnosis'] == 0) {$status2 = '<span class="alert stt">На&nbsp;диагностике</span>';}
			
			if($zk['bool_pozvon'] == 1) {$status3 = '<br><img src="/img/podzv_a.png" alt="" title="Позвонили"/>';}
			elseif($zk['bool_pozvon'] == 0) {$status3 = '<br><img src="/img/podzv.png" alt="" title="Пока не позвонили"/>';}
			
			if($zk['warranty'] == 1) {$status4 = '<br><span class="alert alert-error stt">По&nbsp;гарантии</span></br>';}
			*/
			
			//echo $status.$status4.'<br/>';
			/*.$status2.'2<br/>'.$status3.'3<br/>'*/
		
	
	
	echo <<<END
		<div style="margin: 50px auto; width: 380px; border: 1px solid #ccc; border-radius:5px; -webkit-border-radius:6px; -moz-border-radius:5px; -khtml-border-radius:10px; -webkit-box-shadow: 0 0 6px rgba(0,0,0,0.2); -moz-box-shadow: 0 0 6px rgba(0,0,0,0.2); -ms-box-shadow: 0 0 6px rgba(0,0,0,0.2); box-shadow: 0 0 6px rgba(0,0,0,0.2);">
			<div style="height: 43px; text-shadow: 0 1px 0 rgba(255,255,255,.5); font: 100 18px/42px 'PT Sans', sans-serif; padding: 0 20px; background: #e0e0e0; border-bottom: 1px solid #ccc; -moz-border-radius-topleft: 6px; -moz-border-radius-topright: 6px; -moz-border-radius-bottomright: 0px; -moz-border-radius-bottomleft: 0px; -webkit-border-radius: 6px 6px 0px 0px; border-radius: 6px 6px 0px 0px; font-size: 15px;">
				<span>Статус аппарата с IMEI: "$imei"</span>
			</div>
			<div style="padding: 20px 10px; width: 80%; margin: 0 auto;">
				$info
				$status
				$status2
				$status3
				$status4
			</div>
			<div style="height: 22px; padding: 12px 15px; border-top: 1px solid #e7e7e7; background: #f7f7f7; -moz-border-radius-topleft: 0px; -moz-border-radius-topright: 0px; -moz-border-radius-bottomright: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-radius: 0px 0px 6px 6px; border-radius: 0px 0px 6px 6px;">
				<a href="log_imei.php" style="float: right; text-decoration: none; color: #888;"> Назад </a>
			</div>
		</div>	
END;
		} else {
			echo <<<END
				<div style="margin: 50px auto; width: 380px; border: 1px solid #ccc; border-radius:5px; -webkit-border-radius:6px; -moz-border-radius:5px; -khtml-border-radius:10px; -webkit-box-shadow: 0 0 6px rgba(0,0,0,0.2); -moz-box-shadow: 0 0 6px rgba(0,0,0,0.2); -ms-box-shadow: 0 0 6px rgba(0,0,0,0.2); box-shadow: 0 0 6px rgba(0,0,0,0.2);">
					<div style="height: 43px; text-shadow: 0 1px 0 rgba(255,255,255,.5); font: 100 18px/42px 'PT Sans', sans-serif; padding: 0 20px; background: #e0e0e0; border-bottom: 1px solid #ccc; -moz-border-radius-topleft: 6px; -moz-border-radius-topright: 6px; -moz-border-radius-bottomright: 0px; -moz-border-radius-bottomleft: 0px; -webkit-border-radius: 6px 6px 0px 0px; border-radius: 6px 6px 0px 0px; font-size: 15px;">
						<span></span>
					</div>
					<div style="padding: 20px 10px; width: 80%; margin: 0 auto;">
						<div style="margin: 12px auto;">АППАРАТ С IMEI: "$imei" НЕ НАЙДЕН!</div>
						
					</div>
					<div style="height: 22px; padding: 12px 15px; border-top: 1px solid #e7e7e7; background: #f7f7f7; -moz-border-radius-topleft: 0px; -moz-border-radius-topright: 0px; -moz-border-radius-bottomright: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-radius: 0px 0px 6px 6px; border-radius: 0px 0px 6px 6px;">
						<a href="log_imei.php" style="float: right; text-decoration: none; color: #888;"> Назад </a>
					</div>
				</div>	
END;
		}
	} else {
		echo <<<END
			<div style="margin: 50px auto; width: 380px; border: 1px solid #ccc; border-radius:5px; -webkit-border-radius:6px; -moz-border-radius:5px; -khtml-border-radius:10px; -webkit-box-shadow: 0 0 6px rgba(0,0,0,0.2); -moz-box-shadow: 0 0 6px rgba(0,0,0,0.2); -ms-box-shadow: 0 0 6px rgba(0,0,0,0.2); box-shadow: 0 0 6px rgba(0,0,0,0.2);">
				<div style="height: 43px; text-shadow: 0 1px 0 rgba(255,255,255,.5); font: 100 18px/42px 'PT Sans', sans-serif; padding: 0 20px; background: #e0e0e0; border-bottom: 1px solid #ccc; -moz-border-radius-topleft: 6px; -moz-border-radius-topright: 6px; -moz-border-radius-bottomright: 0px; -moz-border-radius-bottomleft: 0px; -webkit-border-radius: 6px 6px 0px 0px; border-radius: 6px 6px 0px 0px; font-size: 15px;">
					<span></span>
				</div>
				<div style="padding: 20px 10px; width: 80%; margin: 0 auto;">
					<div style="margin: 12px auto;">НЕ УКАЗАН IMEI!</div>
					
				</div>
				<div style="height: 22px; padding: 12px 15px; border-top: 1px solid #e7e7e7; background: #f7f7f7; -moz-border-radius-topleft: 0px; -moz-border-radius-topright: 0px; -moz-border-radius-bottomright: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-radius: 0px 0px 6px 6px; border-radius: 0px 0px 6px 6px;">
					<a href="log_imei.php" style="float: right; text-decoration: none; color: #888;"> Назад </a>
				</div>
			</div>	
END;
	}
?>

</body>
</html>